<?php
if (isset($_POST["sumbit"]))
{
	$db = mysql_connect("mysql513.in.shared-server.net:16033", "JRtu434", "qvoiceDB1");
	mysql_select_db("JRtu434", $db);
	mysql_query("set SQL_BIG_Selects=1");
	mysql_query("SET NAMES utf8");
 	$query = "update RFQS set odate=\"".strtotime($_POST["odate"]).	"\", status=\"".
 	$_POST["status"]."\", subject=\"".$_POST["subject"]."\", samplesize=\"".$_POST["samplesize"].
 	"\", IR=\"".$_POST["IR"]."\", LOI=\"".$_POST["LOI"]."\"";
	if(isset($_POST["B2B"]))
		$query .= "\", B2B=\"".$_POST["B2B"]."\"";
	else
		$query .= ", B2B=\"0\"";	
	$query .= ", feasibility = \"".$_POST["feasibility"]."\", company = \"".$_POST["company"].
	"\", contact = \"".$_POST["contact"]."\", cpc = \"".$_POST["cpc"]."\", genre = \"".$_POST["genre"].
	"\", request = \"".$_POST["request"]."\", reply = \"".$_POST["reply"].
	"\" followup=\"0\" where ID=\"".$_POST["id"]."\"";
	mysql_query($query);
}
?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html lang="ja"> 
<!-- ==== document header ==== --> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<meta http-equiv="Content-Style-Type" content="text/css"> 
<meta http-equiv="Content-Script-Type" content="text/javascript"> 
<title>見積り入力</title>
<?php include 'layout.php'; ?> 
</head>
	<body>
		<div id="content">
			<?php include 'dynamic.php'; if (isset($_POST['id'])) drawmitsumori($id); else drawmitsumori('1'); ?> 
		</div>
	</body>
</html>
